n = int(input())

if n>=90:
    print('A')
elif n>=80:
    print('B')
elif n>=60:
    print('C')
else:
    print('F')